Reconcile inbox sidebar badge with toolbar headline#2423
Open
rafaeelaudibert wants to merge 5 commits into
Open
Reconcile inbox sidebar badge with toolbar headline#2423rafaeelaudibert wants to merge 5 commits into
rafaeelaudibert wants to merge 5 commits into
Conversation
The badge next to "Inbox" in the sidebar counts reports the current user needs to action right now (assigned to them, ready, immediately actionable). The "Reports (N)" headline inside the inbox view was the server's raw total for the active filter set — a wider, unrelated number — and the two could disagree by a lot. - Extract a shared `useUpForReviewCount` hook so both surfaces resolve the count from the same React Query cache entry. - Rename the toolbar headline to "Up for review (N)" so its semantics match the badge by construction. The previous "X up for review · Y in research pipeline" sub-line went away with it (the headline now carries that meaning). - Move the raw inbox total into a clearer sub-line that says "N reports in inbox · M still processing", with the search-active variant calling it out as "X of Y match search". - Add explanatory tooltips on both the headline and the sub-line so the distinction is discoverable. Generated-By: PostHog Code Task-Id: cd26fe55-9707-4905-9394-e55db22f511c
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx:109-110
When `isSearchActive` is `true` the sub-line reads `"X of Y match search"` (or `"X of Y match search · Pipeline paused…"`), but `INBOX_TOTAL_TOOLTIP` still says *"…after any status, source, or reviewer filters you have applied"* — search is neither of those. A user hovering the sub-line during an active search gets tooltip copy that doesn't match what the numbers represent.
```suggestion
const INBOX_TOTAL_TOOLTIP =
"All reports currently in your inbox view, after any search, status, source, or reviewer filters you have applied.";
```
Reviews (1): Last reviewed commit: "Reconcile inbox sidebar badge with toolb..." | Re-trigger Greptile |
The tooltip described the value in terms of where else it appears
("same number shown on the badge next to Inbox in the sidebar"), which
exposes an implementation detail to the user. Describe what the count
*is* and leave the cross-surface coupling for code comments / the PR
description.
Generated-By: PostHog Code
Task-Id: cd26fe55-9707-4905-9394-e55db22f511c
The sub-line shifts to "X of Y match search" while a search query is active, but the tooltip only listed status / source / reviewer filters. Add search to the list so the copy stays accurate in that state. Spotted by Greptile in PR review. Generated-By: PostHog Code Task-Id: cd26fe55-9707-4905-9394-e55db22f511c
The badge next to "Inbox" in the sidebar counts reports the current user needs to action right now (assigned to them, ready, immediately actionable). The "Reports (N)" headline inside the inbox view was the server's raw total for the active filter set — a wider, unrelated number — and the two could disagree by a lot. - Extract a shared `useUpForReviewCount` hook so both surfaces resolve the count from the same React Query cache entry. - Rename the toolbar headline to "Up for review (N)" so its semantics match the badge by construction. The previous "X up for review · Y in research pipeline" sub-line went away with it (the headline now carries that meaning). - Move the raw inbox total into a clearer sub-line that says "N reports in inbox · M still processing", with the search-active variant calling it out as "X of Y match search". - Add explanatory tooltips on both the headline and the sub-line so the distinction is discoverable. Generated-By: PostHog Code Task-Id: cd26fe55-9707-4905-9394-e55db22f511c
The previous commit unintentionally pulled all of main's progress into the branch tree (the signed-commit tool parents new commits onto the remote branch tip, so a local rebase base could not be applied). This commit restores the branch tree to its pre-attempt state so the PR diff once again shows only this PR's intended changes. Generated-By: PostHog Code Task-Id: cd26fe55-9707-4905-9394-e55db22f511c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The badge next to Inbox in the sidebar and the Reports (N) headline inside the inbox view counted different things, so the numbers routinely disagreed:
status=ready,actionability=immediately_actionable(i.e. things you need to action right now).This PR makes them agree by construction and adds tooltips so the meaning is discoverable.
useUpForReviewCounthook (apps/code/src/renderer/features/inbox/hooks/useInboxReports.ts). The sidebar badge and the toolbar headline both call it; React Query dedupes the underlying fetch so the two numbers cannot diverge.readyCountfrom the old pipeline-hint sub-line and fromSignalsToolbar's prop surface.InboxSignalsTabstill computes it locally for theINBOX_VIEWEDanalytics event.Test plan